

#include <prac6_2/Prac6_2E.h>





	// ******************* CONSTRUCTOR ************************************



Prac6_2::Prac6_2(const char * const roomname,TEDROOMComponentID id, unsigned int roomNumMaxMens, TEDROOMPriority roomtaskPrio, TEDROOMStackSizeType roomStack, CEDROOMMemory *pActorMemory ) : 
		CEDROOMComponent(roomname,id,EDROOMprioMINIMUM+1,8,roomNumMaxMens,roomtaskPrio,roomStack, pActorMemory )




		// ***************	Estado Top *****************

		,edroomTopState(*this)


{


}


	//***************	METODOS PUBLICOS  ********************************



		//**********           CONFIGURACION               ************


int Prac6_2::EDROOMConfig() {




 return 0; }



		//**********           START               ************


int Prac6_2::EDROOMStart() {



		//****************** INICIO DEL PROPIO ACTOR **********************

	CEDROOMComponent::EDROOMStart(); 	// Llamada a la funcion Start de la clase Actor

return 0;}


	// ***************	METODOS PROTEGIDOS *******************************



		//**********        COMPORTAMIENTO           ************



void Prac6_2::EDROOMBehaviour() {

	edroomTopState.EDROOMBehaviour();

}




		//**********        ACTORTERMINADO           ************


	#ifdef _EDROOM_SYSTEM_CLOSE

TEDROOMBool Prac6_2::EDROOMIsComponentFinished() {


	return ( Client1.EDROOMIsComponentFinished() && Client2.EDROOMIsComponentFinished() && Client3.EDROOMIsComponentFinished() && Client4.EDROOMIsComponentFinished() && Client8.EDROOMIsComponentFinished() && Client5.EDROOMIsComponentFinished() && Client6.EDROOMIsComponentFinished() && Client7.EDROOMIsComponentFinished() && SuperServer.EDROOMIsComponentFinished() && CEDROOMComponent::EDROOMIsComponentFinished());

}


	#endif

	// ***************	EDROOM Memory ******************************

void Prac6_2::CEDROOMMemory::SetMemory(TEDROOMUInt32 numMessages_, CEDROOMMessage * MessagesMem_, TEDROOMBool * MessagesMemMarks_, CEDROOMQueue::CQueueNode * QueueNodesMem_, TEDROOMBool * QueueNodesMemMarks_){
		CEDROOMComponentMemory::SetMemory( numMessages_,MessagesMem_, MessagesMemMarks_, QueueNodesMem_, QueueNodesMemMarks_, QueueHeads);


}

